import 'package:flutter/material.dart';

class AppTheme {
  static const String _family = 'Lexend';

  static const Color colorPrimary = Color(0xFF00A8C0);
  static const Color colorPrimaryDark = Color(0xFF00D3E5);

  // background color
  static const Color colorBackgroundDark = Color(0xFF151515);
  static const Color colorBackgroundSecondaryDark = Color(0xFF212121);
  static const Color colorBackgroundTertiaryDark = Color(0xFF292929);
  static const Color colorBackgroundQuaternaryDark = Color(0xFF2F2F2F);

  static const Color colorBackground = Color(0xFFFFFFFF);
  static const Color colorBackgroundSecondary = Color(0xFFF5F5F5);
  static const Color colorBackgroundTertiary = Color(0xFFEEEEEE);
  static const Color colorBackgroundQuaternary = Color(0xFFEAEAEA);

  // divider color
  static const Color colorDividersOnPrimaryDark = Color(0xFF373737);
  static const Color colorDividersOnSecondaryDark = Color(0xFF3D3D3D);

  static const Color colorDividersOnPrimary = Color(0xFFE1E1E1);
  static const Color colorDividersOnSecondary = Color(0xFFD2D2D2);

  // text color
  static const Color textColorPrimaryDark = Colors.white;
  static const Color textColorOnPrimaryDark = Color(0xFF033A49);
  static const Color textColorSecondaryDark = Color(0xFFBDBDBD);
  static const Color textColorTertiaryDark = Color(0xFF8F8F8F);
  static const Color textColorQuaternaryDark = Color(0xFF818181);
  static const Color textColorDisableDark = Color(0xFF5A5A5A);

  static const Color textColorPrimary = Color(0xFF32323C);
  static const Color textColorOnPrimary = Color(0xFFFFFFFF);
  static const Color textColorSecondary = Color(0xFF666666);
  static const Color textColorTertiary = Color(0xFF808080);
  static const Color textColorQuaternary = Color(0xFFAFAFAF);
  static const Color textColorDisable = Color(0xFFC9C9C9);

  static const Color textColorIncrease = Color(0xFF59AB5A);
  static const Color textColorDecrease = Color(0xFFF44459);

  static const Color colorWhite8 = Color(0x14FFFFFF);
  static const Color colorBlack16 = Color(0x29000000);

  static const Color textColorBabyBlue = Color(0xFF5BFDFF);

  static const List<Color> gradientPrimary = [Color(0xFF0ABD4A), Color(0xFF0099C9)];
  static const List<Color> gradientSecondary = [Color(0x33FFFFFF), Color(0x33FFFFFF)];

  static ColorScheme colorScheme = ColorScheme.fromSeed(
    seedColor: colorPrimaryDark,
    onPrimary: Colors.white,
    primary: colorPrimaryDark,
    background: colorBackgroundDark,
    surface: colorBackgroundDark,
  );

  static ThemeData myTheme = ThemeData(
    colorScheme: colorScheme,
    textTheme: ThemeData.dark().textTheme.apply(displayColor: textColorPrimaryDark, fontFamily: _family),
    primaryTextTheme: ThemeData.dark().textTheme.apply(displayColor: textColorPrimaryDark, fontFamily: _family),
    primaryColor: colorPrimaryDark,
    iconTheme: const IconThemeData().copyWith(color: Colors.white),
    appBarTheme: const AppBarTheme().copyWith(
      backgroundColor: colorBackgroundDark,
      foregroundColor: colorBackgroundDark,
      shadowColor: Colors.transparent,
      titleTextStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColorPrimaryDark, fontFamily: _family),
    ),
    scrollbarTheme: ScrollbarThemeData(
      thickness: MaterialStateProperty.all(4),
      thumbColor: MaterialStateProperty.all(Colors.white.withOpacity(0.4)),
      crossAxisMargin: 8,
    ),
    outlinedButtonTheme: OutlinedButtonThemeData(
      style: OutlinedButton.styleFrom(side: const BorderSide(color: Color(0x80FFFFFF)), foregroundColor: Colors.white, elevation: 0),
    ),
    tabBarTheme: TabBarThemeData().copyWith(
      labelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, fontFamily: _family),
      unselectedLabelStyle: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, fontFamily: _family),
    ),
    useMaterial3: true,
  );
}
